portabilityfandomcom-20200223-history
Mentoring:Moshi Monsters Wiki
Mentoring requests →''' '''What is your username? Are you an admin on the wiki you are asking about? REALROSS, yes. Please link to the wiki (or the specific templates or pages you want help with) here: w:c:moshimonsters / w:c:moshimonsters:Template:Infobox character What would you like help with (e.g. styling, making, or converting an infobox or making a page portable)? styling - general styling help in general would be nice too Any other information (e.g. links, screenshots, or snippets): Our infobox is complete, it's just to ask if there is a possible method to have the theme colours dictated through in-article-coding ie. , as we had been able to do in our prior-"unportable" template. (If this is the wrong place to ask, please direct me to where i can ask ,thanks :D ) In order to ensure you can implement and maintain a Mentoring solution, how would you classify your technical skill level (or those of whomever will be maintaining your Templates)? able with decent knowledge on the basics. 20:51, January 8, 2016 (UTC) Responses Hi, This requires use of w:c:moshimonsters:Special:CSS to change the appearance of the infoboxes. Create for the general infobox In a typical infobox you'd create something like : But in a portable infobox it would be something like this: Information AlignmentGood In your add something like: /* For CSS that should only affect the Wikia skin */ .pi-theme-evil, .pi-theme-good { background: white; color: black; border : 1px solid; } That will give it an appearance that you can change with : You can see it working here. To change theme for a specific infobox make changes to the css , after the above code: .pi-theme-good .pi-header { background: green; color: white; text-align: center; } Then change the theme using : A good guide on styling an infobox is here : http://fanz-of-lucy-worsley.wikia.com/wiki/The_Styling_of_a_PortableInfobox Dessamator (talk) 12:22, January 9, 2016 (UTC) : Hey thank you for your response. I don't think I was clear enough, though this is really hard to explain. If possible, I would like to use the same infobox every time and have a variable to change the main header colour. (where the pagename goes) : I would like to use any hex colour ie. : Would it be possible to use // and then this would make the header colour #529291 (if that were a legit hex code) : If it helps, w:c:moshimonsters:Template:CharacterSandbox / w:c:moshimonsters:Lucki (where this template is in action) - what is being done with the } parameter is what I'd like to achieve again. Where you can use any hex colour at all and it changes the appearance of the infobox. One infobox forever. : I hope I cleared this up. Thank you. User:REALROSS (talk) 18:35, January 9, 2016 (UTC) : I understood it. The problem is that portable infoboxes change the appearance using sitewide CSS. This is by deliberate because inline CSS may defeat the purpose of "portable infoboxes", which is to make content look properly everywhere. You can however use wikitext to apply any changes you want e.g.: Information Alignment Good However, this is not recommended for various reasons. See also : * https://vineetgupta22.wordpress.com/2011/07/09/inline-vs-internal-vs-external-css/ Dessamator (talk) 19:18, January 9, 2016 (UTC) :: Thanks for a speedy response! If I was to use wikitext, would there be a point in the "theme source" part and would we need any accompanying CSS? Thanks User:REALROSS (talk) 20:22, January 9, 2016 (UTC) :: It depends on how you make your template. Ultimately portable infoboxes were designed to get rid of the messy and complicated mix between styles, parser functions and dozens of sub-templates. More importantly, there are visual aspects of the portable infobox that you can't change with wikitext or inline styles.Dessamator (talk) 09:45, January 10, 2016 (UTC) :: I'm starting to realise I can't do what I want to achieve so I am best just to use the theme-source option and create lots of different themes. Our character infobox has it's own theme, "character" - would it be possible to have two themes "character" and the colour? User:REALROSS (talk) 18:04, January 10, 2016 (UTC) :: Yes. For example, you can have a base theme for all characters and one to change the color, e.g. character-blue, character-green or whatever. That's what I showed you above when you first made this request. See : :: http://infoboxpreview.appspot.com/?snapshotId=-K7jv1hKjLhPg1MksvvF . :: Dessamator (talk) 09:11, January 11, 2016 (UTC)